Skip to content

Refactor code for USB-stick - #53

Merged
brefra merged 55 commits into
mainfrom
refactor_stick
Jan 23, 2021
Merged

brefra merged 55 commits into
mainfrom
refactor_stick

Conversation

@brefra

@brefra brefra commented Dec 24, 2020 •

Copy link
Copy Markdown
Contributor

This PR is based on #52, so that one needs to be merged first.

Change log:

  • Bug-fix: Power history was not reported (0 value) during last week of the month
  • Improvement: Validate message checksums
  • Improvement: Do a single ping request to validate if node is on-line
  • Improvement: Guard Scan sensitivity setting to medium
  • Improvement: Move general module code of messages, nodes, connection to the init.py files.
  • Improvement: Do proper timeout handling while sequence counter resets (once every 65532 messages)
  • Improvement: Better code separation. All logic is in their designated files:
    1. Connection (connection/*.py)
    2. Data parsing (parser.py)
    3. Data encoding/decoding of message (messages/*.py)
    4. Message handling - Initialization & transportation (controller.py)
    5. Message processing - Do the required stuff (stick.py & nodes/*.py)
  • Improvement: Resolves all flake8 comments reported in [IMPROVE] Solve complexity #28

@codecov

codecov Bot commented Dec 24, 2020 •

Copy link
Copy Markdown

Codecov Report

Merging #53 (6658825) into main (d1e91b3) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   96.26%   96.28%   +0.01%     
==========================================
  Files           4        4              
  Lines        1581     1588       +7     
==========================================
+ Hits         1522     1529       +7     
  Misses         59       59              
Impacted Files Coverage Δ
plugwise/constants.py 100.00% <100.00%> (ø)
plugwise/exceptions.py 100.00% <100.00%> (ø)
tests/test_smile.py 97.80% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1e91b3...6658825. Read the comment docs.

@brefra
brefra marked this pull request as ready for review December 29, 2020 10:21
@brefra
brefra requested review from CoMPaTech and bouwew December 29, 2020 10:22
@brefra
brefra force-pushed the refactor_stick branch 2 times, most recently from 5f6e872 to df8675f Compare December 29, 2020 13:38
@brefra
brefra merged commit b0bb0be into main Jan 23, 2021
@brefra
brefra deleted the refactor_stick branch January 23, 2021 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants